﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Scheduler.Model
{
    /// <summary>
    /// 接口API地址信息表
    /// </summary>
    [Comment("接口API地址信息表")]
    // [Table("modules")]
    public class Modules : BaseEntity
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Comment("名称")]
        [StringLength(50)]
        [Required]
        public string? Name { get; set; }
        /// <summary>
        /// 菜单链接地址
        /// </summary>
        [Comment("菜单链接地址")]
        [StringLength(100)]
        [Required]
        public string? LinkUrl { get; set; }
        /// <summary>
        /// 区域名称
        /// </summary>
        [Comment("区域名称")]
        [StringLength(2000)]
        public string? Area { get; set; }
        /// <summary>
        /// 控制器名称
        /// </summary>
        [Comment("控制器名称")]
        [StringLength(2000)]
        public string? Controller { get; set; }
        /// <summary>
        /// Action名称
        /// </summary>
        [Comment("Action名称")]
        [StringLength(2000)]
        public string? Action { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        [Comment("图标")]
        [StringLength(100)]
        [Required]
        public string? Icon { get; set; }
        [Comment("菜单编号")]
        [StringLength(10)]
        public string? Code { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [Comment("排序")]
        public int OrderSort { get; set; }
        /// <summary>
        /// /描述
        /// </summary>
        [Comment("描述")]
        [StringLength(100)]
        public string? Description { get; set; }
        /// <summary>
        /// 是否是右侧菜单
        /// </summary>
        [Comment("是否是右侧菜单")]
        public bool IsMenu { get; set; }
        /// <summary>
        /// 是否激活
        /// </summary>
        [Comment("是否激活")]
        public bool Enabled { get; set; }
    }
}
